import RouterNest from '@/views/RouterNest.vue';
import RechargeRecord from '@/views/user/cost/RechargeRecord.vue';
import ConsumptionRecord from '@/views/user/cost/ConsumptionRecord.vue';
import UserCenter from '@/views/user/UserCenter.vue';

export const UserRoutes = [
  {
    path: 'user',
    name: 'user',
    component: RouterNest,
    redirect: () => ({ name: 'apikey-list' }),
    meta: { name: '密钥' },
    children: [
      {
        path: 'recharge',
        name: 'recharge-record',
        component: RechargeRecord,
        meta: { name: 'rechargeRecord' },
      },
      {
        path: 'consumption',
        name: 'consumption-record',
        component: ConsumptionRecord,
        meta: { name: 'consumptionRecord' },
      },
      {
        path: 'center',
        name: 'user-center',
        component: UserCenter,
        meta: { name: 'userCenter' },
      },
    ],
  },
];
